import request from '@/utils/request'
const  api_name= "/eduservice/teacher";

export default {

  //1. 教师列表 分页带查询
  pageListTeacherCondition(current, limit, teacherQuery) {
    return request({
      url: `${api_name}/pageListTeacherCondition/${current}/${limit}`,
      method: 'post',
      data: teacherQuery
    })
  },
  //2. 教师删除
  removeById(id){
    return request({
      url: `${api_name}/${id}`,
      method: 'delete'
    })

  },
  //3. 新增教师
  save(teacher) {
    return request({
      url: `${api_name}/addTeacher`,
      method: 'post',
      data: teacher
    })
  },
  //4. 回显教师信息
  getById(id) {
    return request({
      url: `${api_name}/getTeacher/${id}`,
      method: 'get'
    })
  },
  //5. 更新教师信息
  updateById(teacher) {
    return request({
      url: `${api_name}/updateTeacher`,
      method: 'post',
      data: teacher
    })
  },
  //6. 获取所有教师
  getList() {
    return request({
      url: `${api_name}/findAll`,
      method: 'get'
    })
  },

}
